package order;

import goods.Goods;

import java.io.*;

public class OrderDataRead {
    private static OrderDAOArrayList orders = new OrderDAOArrayList();
    public static void main() throws IOException {

        BufferedReader in;
        in = new BufferedReader(new InputStreamReader(new FileInputStream("订单数据.txt"),"utf-8"));
        String line;
        while ((line = in.readLine()) != null){
            String[] temp = line.split(" ");
            Goods tempGoods = new Goods(temp[1],temp[2],temp[3],temp[4],temp[5]);
            Order O = new Order(temp[0],tempGoods,temp[6],temp[7]);
            orders.addOrderData(O);

        }
    }

    public  OrderDAOArrayList getOrders() {
        return orders;
    }
}
